const promise = new Promise((resolve, reject) => resolve('failure'));

promise
  .then((result) => {
    console.log(result);
    throw new Error('error');
  })
  .then((result) => console.log(result))
  .then((result) => console.log(result))
  .catch((error) => console.log(error));
